home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
utmisc2
/
led.lha
/
LED
/
LED.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-03-31
|
654b
|
28 lines
/* LED
* Toggle the state of the audio filter (CIAF_LED)
*
* Returns 0 if filter OFF (LED fully ON)
* " 1 if filter ON (LED dimmed, or OFF, depending on Amiga model ;-)
*
* Shell ONLY!!
*/
#define __USE_SYSBASE 1
static const unsigned char version[] = "$VER: LED 0.2 "__AMIGADATE__" ©Gérard Cornu ;-)";
#include <exec/types.h>
#include <hardware/cia.h>
/* Address of CIAA chip:
*/
#define CIAA 0xBFE001
/* Pointer to the CIA (8520) chip:
*/
struct CIA *cia = (struct CIA *) CIAA;
long __saveds led(void) {
return((cia->ciapra ^= CIAF_LED) & CIAF_LED ? 1: 0);
}